home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12028 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: solon.com!not-for-mail
  2. From: kanze@gabi-soft.fr (J. Kanze)
  3. Newsgroups: comp.lang.c,comp.lang.c.moderated
  4. Subject: Re: const pointer confusion...
  5. Date: 28 Mar 1996 06:47:53 -0600
  6. Organization: GABI Software, Sarl.
  7. Sender: clc@solutions.solon.com
  8. Approved: clc@solutions.solon.com
  9. Message-ID: <4je1pp$g2r@solutions.solon.com>
  10. References: <4j06gm$7oa@solutions.solon.com> <4j41io$nma@solutions.solon.com>
  11.     <4j6389$3iq@solutions.solon.com> <4ja3s4$par@solutions.solon.com>
  12. NNTP-Posting-Host: solutions.solon.com
  13.  
  14. In article <4jckoq$a32@solutions.solon.com> Lawrence Kirby
  15. <fred@genesis.demon.co.uk> writes:
  16.  
  17. |> In article <4ja3s4$par@solutions.solon.com>
  18. |>            kanze@lts.sel.alcatel.de "James Kanze US/ESC 60/3/141 #40763" writes:
  19.  
  20. |> >I agree about not using any old arbitrary order, but the cv-qualifiers
  21. |> >should definitly come *after* what they modify.  It is only in the
  22. |> >declaration-specifier that you have any freedom.  In the declarator,
  23. |> >the cv-qualifier *must* follow what it modifies.  So why do it any
  24. |> >differently here.
  25.  
  26. |> Personally I think it reads more clearly with the qualifier prior to the
  27. |> type.
  28.  
  29. Except when it is a pointer that is const, n'est-ce pas? :-)
  30.  
  31. I'll admit that it somehow `looks' more natural to put the const first,
  32. at least, until you get used to the other alternative.  (This may be
  33. related to the fact that we put adjectives in front of the noun in
  34. English, and that we somehow feal that const is an adjective.)  I find
  35. it more consistent to put the const after, however, since I have to do
  36. so anyway in some cases.
  37. -- 
  38. James Kanze           (+33) 88 14 49 00          email: kanze@gabi-soft.fr
  39. GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
  40. Conseils en informatique industrielle --
  41.                             -- Beratung in industrieller Datenverarbeitung
  42.